﻿@inherits BaseComponent

<Tabs Animated>
    <TabPane Key="Account" Tab="@Language?["Login.WithAccount"]">
        <LoginFormUser Model="Model" OnLogin="OnLogin" />
    </TabPane>
    @if (QRCode != null)
    {
        <TabPane Key="QRCode" Tab="@Language?["Login.WithQRCode"]">@QRCode</TabPane>
    }
    @if (OnSendSMS != null)
    {
        <TabPane Key="Phone" Tab="@Language?["Login.WithPhone"]">
            <LoginFormPhone Model="Model" OnSendSMS="OnSendSMS" OnLogin="OnLogin" />
        </TabPane>
    }
</Tabs>

@code {
    [Parameter] public LoginFormInfo Model { get; set; }
    [Parameter] public RenderFragment QRCode { get; set; }
    [Parameter] public Func<Task> OnLogin { get; set; }
    [Parameter] public Func<string, Task<Known.Result>> OnSendSMS { get; set; }
}